package processes.echoProcess;

import os.MiniOS;
import os.MiniProcess;
import os.MiniThread;

public class EchoProcessThread extends MiniThread
{

	public EchoProcessThread(MiniProcess process, String tid)
	{
		super(process, tid);
		this.description = "Main Thread";
	}

	@Override
	public void passThreadArguments(Object[] arguments)
	{
	}

	@Override
	public void run()
	{
		System.out.println("Inside Run");
		while (true)
		{
			isExcecutionStopped();
			MiniOS.getInstance().outputRequest(this, "Enter a string to echo:");
			isExcecutionStopped();
			MiniOS.getInstance().inputRequest(this);
			isExcecutionStopped();
			MiniOS.getInstance().outputRequest(this, getInput());
		}
	}

}
